/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package intopo.evogame.partnerselection.player;

import intopo.evogame.partnerselection.chromosome.Chromosome;
import intopo.evogame.partnerselection.population.Node;
import intopo.game.Strategy;
import java.io.IOException;

/**
 * A player factory used to construct an initial population.
 *
 * <p> Every player class in this package contains a static method that returns a factory.
 *
 * @author <a href="mailto:mariano.pedro@gmail.com">Pedro Mariano</a>
 *
 * @version 1.0

 * @param <S> The class that represents the strategy used by the players.
 * @param <C> The chromosome that represents the player genotype.
 * @param <P> The class of the player constructed by the factory.
 */
public interface PlayerFactory<
	S extends Strategy<S>,
	C extends Chromosome<S>,
	P extends AbstractPlayer<S, C, P>>
{
	/**
	 * Create a player given its chromosome.
	 * @param c Chromosome of the player.
	 * @return a player with the given chromosome
	 */
	P create (C c, Node<S, C, P> node, int bornTime)
		throws IOException;
	/**
	 * Create a player given its chromosome.
	 * @param c Chromosome of the player.
	 * @return a player with the given chromosome
	 */
	P create (C c, int parentID, Node<S, C, P> node, int bornTime)
		throws IOException;
}

// Local Variables:
// mode: java
// mode: flyspell-prog
// ispell-local-dictionary: "british"
// End:
